package com.itheima.zy01;


import java.util.TreeSet;

public class MyTreeSet {
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();

        Student student = new Student("卢本伟", 30);
        Student student1 = new Student("周星驰", 39);
        Student student2 = new Student("豆豆", 33);
        Student student3 = new Student("逗逗", 32);
        Student student4 = new Student("皮皮", 32);

        ts.add(student);
        ts.add(student1);
        ts.add(student2);
        ts.add(student3);
        ts.add(student4);

        System.out.println(ts);
    }
}
